<template>
  <div>
    <el-table :data="memberlist" border style="width: 100%">
      <el-table-column prop="uid" label="用户编号"> </el-table-column>
      <el-table-column prop="nickname" label="昵称"> </el-table-column>
      <el-table-column prop="phone" label="手机号"> </el-table-column>
      <el-table-column prop="status" label="状态">
        <template slot-scope="scope">
          <div>
            <el-button type="info" v-if='scope.row.status==1'>启用</el-button>
            <el-button type="warning" v-else>禁用</el-button>
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="address" label="操作">
        <template slot-scope="scope">
          <div>
            <el-button type="success" @click="bianji(scope.row.uid)">编辑</el-button>
            <!-- <v-del @del="del(scope.row.uid)"></v-del> -->
          </div>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import {mapActions,mapGetters} from 'vuex'

export default {
  data() {
    return {
    };
  },
  methods:{
      ...mapActions({
          reqchangelist:'member/reqchangelist'
      }),
    //   点击编辑
    bianji(uid){
        this.$emit('bianji',uid)
    }
    // 点击删除

  },
  computed:{
      ...mapGetters({
          memberlist:'member/list'
      })
  },
  mounted() {
      this.reqchangelist()
  },
};
</script>

<style scoped>
</style>